#!/usr/bin/env bash
# shell 目录
basepath=$(cd `dirname $0`; pwd)
#
cmdpath=$(cd .; pwd)
app_dir=`basename $cmdpath`;
docker run -it \
--rm  \
--network=host \
--cpus=1 \
-m 512M \
--memory-swap=-1 \
-v $cmdpath:/go/src/gitee.com/wolferhua/$app_dir \
-w /go/src/gitee.com/wolferhua/$app_dir \
reg.qiniu.com/library/golang go "$@"
# docker ps -a|grep Exited|awk '{print $1}'|xargs docker rm > /dev/null 2>&1


#sudo ln -s  ~/workspace/dockers/wuhua/bash/go.sh /usr/bin/go&& sudo chmod +x  /usr/bin/go